<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>柱状图</title>

    <!-- <script src="/js/jquery-1.4.2.js"></script> -->
    <script src="/lib/echarts.min.js"></script>
    <script src="/lib/jquery-3.4.1/jquery-3.4.1.min.js"></script>

</head>
<body>
<div id="main" style="width: 800px;height: 500px;"></div>


<script>
    var chartDom = document.getElementById('main');
    var myChart = echarts.init(chartDom);
    var option;

    $.ajax({
        // "url": "http://localhost:8080//flowerKind/echartsBar",
        "data": {},
        "success": function (result) {
      option = {
  xAxis: {
    type: 'category',
    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      data: [120, 200, 150, 80, 70, 110, 130],
      type: 'bar'
    }
  ]
};

            myChart.setOption(option);
        },
        // "dataType": "json"
    });
</script>
</body>
</html>